home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-29 | 1.2 KB | 39 lines | [TEXT/MPS ] |
- // Copyright © 1995 Apple Computer, Inc. All rights reserved.
- // Release Version: $ 1.0 d11 $
-
- #ifndef DUSELECTABLE_H
- #define DUSELECTABLE_H
-
- //==========================================================================
- class FW_CWritableStream;
- class FW_CReadableStream;
- class FW_CRect;
-
- //==========================================================================
- class FW_CLASS_ATTR DU_MSelectable {
- public:
- FW_DECLARE_CLASS
- public:
- DU_MSelectable(const FW_CRect& bounds);
- virtual ~DU_MSelectable();
- // drawing
- virtual void Draw(FW_CGraphicContext& gc);
- virtual void DrawSelectionFeedback(FW_CGraphicContext& gc);
- // selection
- virtual void Select(FW_Boolean newState);
- virtual FW_Boolean IsSelected();
- virtual FW_CRect GetBounds();
- virtual FW_Boolean Hit(Environment *ev, const FW_CPoint& pt);
- // storage
- virtual void Flatten(FW_CWritableStream& stream);
- static void Write(FW_CWritableStream& stream, const void* objectRep);
- static void* Read(FW_CReadableStream& stream);
- protected:
- DU_MSelectable(FW_CReadableStream& stream);
- private:
- FW_CRect fBounds;
- FW_Boolean fSelected;
- };
-
- //==========================================================================
- #endif